<?php

    function Domain() {
        $host = $_SERVER['HTTP_HOST'];
        $hostr = explode('.', $host);
        $domain = NULL;
        $segc = count($hostr);
        if ($segc==3) {
            $domain = $hostr[$segc-2].".".$hostr[$segc-1];
        }
        else {
            $domain = $host;
        }
        return $domain;
    }

//echo Domain();
//exit;

//define('DEV', TRUE);

        ini_set('session.cookie_path', '/');
        ini_set('session.cookie_domain', ".".Domain());//session跨域
        
	define('APP_DEBUG', TRUE); // 开启调试模式
	define('APP_NAME', "App");//项目名称
	define('APP_PATH', "../Include/App/");//项目路径
	define('THINK_PATH', "../Include/ThinkPHP/");
	define('RUNTIME_PATH', "./Runtime/");
/**/

require THINK_PATH.'ThinkPHP.php';//加载ThinkPHP框架
//require "./ThinkPHP/ThinkPHP.php";

?>